<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Awesome-pyecharts</title>
	<script src="https://cdn.bootcss.com/jquery/3.0.0/jquery.min.js"></script>
    <script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
    <script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts-gl.min.js"></script>

</head>

<body>
    <div id="bard" style="width:1800px; height:900px;"></div>
    <a href="./line">切换折线</a>
    <a href="./bar">2d柱图</a>
    <script>
        var chart = echarts.init(document.getElementById('bard'), 'white', {renderer: 'canvas'});
        $(
            function () {
                fetchData(chart);
                setInterval(fetchData, 120000);
            }
        );

        function fetchData() {
            $.ajax({
                type: "GET",
                url: "http://192.168.50.207:9000/bardChart",
                dataType: 'json',
                success: function (result) {
                    chart.setOption(result);
                }
            });
        }
    </script>
</body>
</html>